<template>
	<view class="main">
		<my-back></my-back>
		<view class="blank" style="height: 100rpx;"></view>
		<view class="wrap">
			<view class="lg">备份助记词</view>
			<view class="md">请按顺序抄写助记词，确保备份正确</view>
			
			<view class="list">
				<view class="tag" v-for="(i,k) in mnemonic" :key="k">
					{{i}}
					<view class="num">
						{{k+1}}
					</view>
				</view>
			</view>
			
			<view>请勿将助记词在互联网环境下分享和存储，比如邮件、相册、社交应用等。</view>
			
			<view class="blank" style="height: 100rpx;">
				
			</view>
			<button class="cu-btn radius block bg-blue" @click="next">
				确认已备份
			</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				token: '',
				mnemonic: [],
			}
		},
		onLoad(opt) {
			this.token = opt.token
			this.$u.get('/member/mnemonic?token=' + opt.token).then(res => {
				this.mnemonic = res.data.result.mnemonic
			})
		},
		methods: {
			next() {
				uni.navigateTo({
					url: '/pages/account/step2?token=' + this.token
				})
			}
		}
	}
</script>

<style lang="scss">
	.main {
		height: 100vh;
		background: url(../../static/images/login.png);
		background-size: cover;
		display: flex;
		flex-flow: column;
		
		.wrap {
			padding: 60rpx;
			color: #fff;
			line-height: 1.8;
			
			.lg {
				font-size: 40rpx;
				letter-spacing: 4rpx;
			}
			.md {
				font-size: 30rpx;
				letter-spacing: 2rpx;
			}
			
			.list {
				display: flex;
				flex-flow: row wrap;
				justify-content: space-around;
				padding: 60rpx 0;
				
				.tag {
					background: rgba(37,61,106,0.3);
					width: 200rpx;
					height: 80rpx;
					margin-top: 10rpx;
					font-size: 28rpx;
					display: flex;
					justify-content: center;
					align-items: center;
					position: relative;
					.num {
						position: absolute;
						right: 0;
						top: 0;
						transform: scale(0.8);
					}
				}
			}
		}
	}
</style>
